package com.service.role;

import com.dao.role.RoleMapper;
import com.pojo.Role;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RoleServiceImpl implements RoleService{

    @Autowired
    private RoleMapper roleMapper;

    @Override
    public List<Role> list() {
        return roleMapper.list();
    }

    @Override
    public int add(Role role) {
        return roleMapper.add(role);
    }

    @Override
    public Role selectId(int id) {
        return roleMapper.selectId(id);
    }

    @Override
    public int update(Role role) {
        return roleMapper.update(role);
    }

    @Override
    public int delete(int id) {
        return roleMapper.delete(id);
    }
}
